Integrand size = 29, antiderivative size = 241 \[ \int \frac {(h+i x)^2 \left (a+b \log \left (c (d+e x)^n\right )\right )}{f+g x} \, dx=\frac {a i (g h-f i) x}{g^2}-\frac {b i (e h-d i) n x}{2 e g}-\frac {b i (g h-f i) n x}{g^2}-\frac {b n (h+i x)^2}{4 g}-\frac {b (e h-d i)^2 n \log (d+e x)}{2 e^2 g}+\frac {b i (g h-f i) (d+e x) \log \left (c (d+e x)^n\right )}{e g^2}+\frac {(h+i x)^2 \left (a+b \log \left (c (d+e x)^n\right )\right )}{2 g}+\frac {(g h-f i)^2 \left (a+b \log \left (c (d+e x)^n\right )\right ) \log \left (\frac {e (f+g x)}{e f-d g}\right )}{g^3}+\frac {b (g h-f i)^2 n \operatorname {PolyLog}\left (2,-\frac {g (d+e x)}{e f-d g}\right )}{g^3} \]
[Out]
Time = 0.16 (sec) , antiderivative size = 241, normalized size of antiderivative = 1.00, number of steps used = 11, number of rules used = 8, \(\frac {\text {number of rules}}{\text {integrand size}}\) = 0.276, Rules used = {2465, 2436, 2332, 2441, 2440, 2438, 2442, 45} \[ \int \frac {(h+i x)^2 \left (a+b \log \left (c (d+e x)^n\right )\right )}{f+g x} \, dx=\frac {(g h-f i)^2 \log \left (\frac {e (f+g x)}{e f-d g}\right ) \left (a+b \log \left (c (d+e x)^n\right )\right )}{g^3}+\frac {(h+i x)^2 \left (a+b \log \left (c (d+e x)^n\right )\right )}{2 g}+\frac {a i x (g h-f i)}{g^2}+\frac {b i (d+e x) (g h-f i) \log \left (c (d+e x)^n\right )}{e g^2}-\frac {b n (e h-d i)^2 \log (d+e x)}{2 e^2 g}+\frac {b n (g h-f i)^2 \operatorname {PolyLog}\left (2,-\frac {g (d+e x)}{e f-d g}\right )}{g^3}-\frac {b i n x (e h-d i)}{2 e g}-\frac {b i n x (g h-f i)}{g^2}-\frac {b n (h+i x)^2}{4 g} \]
[In]
[Out]
Rule 45
Rule 2332
Rule 2436
Rule 2438
Rule 2440
Rule 2441
Rule 2442
Rule 2465
Rubi steps \begin{align*} \text {integral}& = \int \left (\frac {i (g h-f i) \left (a+b \log \left (c (d+e x)^n\right )\right )}{g^2}+\frac {(g h-f i)^2 \left (a+b \log \left (c (d+e x)^n\right )\right )}{g^2 (f+g x)}+\frac {i (h+i x) \left (a+b \log \left (c (d+e x)^n\right )\right )}{g}\right ) \, dx \\ & = \frac {i \int (h+i x) \left (a+b \log \left (c (d+e x)^n\right )\right ) \, dx}{g}+\frac {(i (g h-f i)) \int \left (a+b \log \left (c (d+e x)^n\right )\right ) \, dx}{g^2}+\frac {(g h-f i)^2 \int \frac {a+b \log \left (c (d+e x)^n\right )}{f+g x} \, dx}{g^2} \\ & = \frac {a i (g h-f i) x}{g^2}+\frac {(h+i x)^2 \left (a+b \log \left (c (d+e x)^n\right )\right )}{2 g}+\frac {(g h-f i)^2 \left (a+b \log \left (c (d+e x)^n\right )\right ) \log \left (\frac {e (f+g x)}{e f-d g}\right )}{g^3}+\frac {(b i (g h-f i)) \int \log \left (c (d+e x)^n\right ) \, dx}{g^2}-\frac {(b e n) \int \frac {(h+i x)^2}{d+e x} \, dx}{2 g}-\frac {\left (b e (g h-f i)^2 n\right ) \int \frac {\log \left (\frac {e (f+g x)}{e f-d g}\right )}{d+e x} \, dx}{g^3} \\ & = \frac {a i (g h-f i) x}{g^2}+\frac {(h+i x)^2 \left (a+b \log \left (c (d+e x)^n\right )\right )}{2 g}+\frac {(g h-f i)^2 \left (a+b \log \left (c (d+e x)^n\right )\right ) \log \left (\frac {e (f+g x)}{e f-d g}\right )}{g^3}+\frac {(b i (g h-f i)) \text {Subst}\left (\int \log \left (c x^n\right ) \, dx,x,d+e x\right )}{e g^2}-\frac {(b e n) \int \left (\frac {i (e h-d i)}{e^2}+\frac {(e h-d i)^2}{e^2 (d+e x)}+\frac {i (h+i x)}{e}\right ) \, dx}{2 g}-\frac {\left (b (g h-f i)^2 n\right ) \text {Subst}\left (\int \frac {\log \left (1+\frac {g x}{e f-d g}\right )}{x} \, dx,x,d+e x\right )}{g^3} \\ & = \frac {a i (g h-f i) x}{g^2}-\frac {b i (e h-d i) n x}{2 e g}-\frac {b i (g h-f i) n x}{g^2}-\frac {b n (h+i x)^2}{4 g}-\frac {b (e h-d i)^2 n \log (d+e x)}{2 e^2 g}+\frac {b i (g h-f i) (d+e x) \log \left (c (d+e x)^n\right )}{e g^2}+\frac {(h+i x)^2 \left (a+b \log \left (c (d+e x)^n\right )\right )}{2 g}+\frac {(g h-f i)^2 \left (a+b \log \left (c (d+e x)^n\right )\right ) \log \left (\frac {e (f+g x)}{e f-d g}\right )}{g^3}+\frac {b (g h-f i)^2 n \text {Li}_2\left (-\frac {g (d+e x)}{e f-d g}\right )}{g^3} \\ \end{align*}
Time = 0.17 (sec) , antiderivative size = 224, normalized size of antiderivative = 0.93 \[ \int \frac {(h+i x)^2 \left (a+b \log \left (c (d+e x)^n\right )\right )}{f+g x} \, dx=\frac {-2 b d^2 g^2 i^2 n \log (d+e x)+e \left (g i x (2 a e (4 g h-2 f i+g i x)+b n (2 d g i-e (8 g h-4 f i+g i x)))+4 a e (g h-f i)^2 \log \left (\frac {e (f+g x)}{e f-d g}\right )+2 b \log \left (c (d+e x)^n\right ) \left (g i (d (4 g h-2 f i)+e x (4 g h-2 f i+g i x))+2 e (g h-f i)^2 \log \left (\frac {e (f+g x)}{e f-d g}\right )\right )\right )+4 b e^2 (g h-f i)^2 n \operatorname {PolyLog}\left (2,\frac {g (d+e x)}{-e f+d g}\right )}{4 e^2 g^3} \]
[In]
[Out]
Result contains higher order function than in optimal. Order 9 vs. order 4.
Time = 1.24 (sec) , antiderivative size = 721, normalized size of antiderivative = 2.99
method | result | size |
risch | \(\frac {b \ln \left (\left (e x +d \right )^{n}\right ) i^{2} x^{2}}{2 g}-\frac {b \ln \left (\left (e x +d \right )^{n}\right ) i^{2} x f}{g^{2}}+\frac {2 b \ln \left (\left (e x +d \right )^{n}\right ) i x h}{g}+\frac {b \ln \left (\left (e x +d \right )^{n}\right ) \ln \left (g x +f \right ) f^{2} i^{2}}{g^{3}}-\frac {2 b \ln \left (\left (e x +d \right )^{n}\right ) \ln \left (g x +f \right ) f h i}{g^{2}}+\frac {b \ln \left (\left (e x +d \right )^{n}\right ) \ln \left (g x +f \right ) h^{2}}{g}-\frac {b n \operatorname {dilog}\left (\frac {\left (g x +f \right ) e +d g -e f}{d g -e f}\right ) f^{2} i^{2}}{g^{3}}+\frac {2 b n \operatorname {dilog}\left (\frac {\left (g x +f \right ) e +d g -e f}{d g -e f}\right ) f h i}{g^{2}}-\frac {b n \operatorname {dilog}\left (\frac {\left (g x +f \right ) e +d g -e f}{d g -e f}\right ) h^{2}}{g}-\frac {b n \ln \left (g x +f \right ) \ln \left (\frac {\left (g x +f \right ) e +d g -e f}{d g -e f}\right ) f^{2} i^{2}}{g^{3}}+\frac {2 b n \ln \left (g x +f \right ) \ln \left (\frac {\left (g x +f \right ) e +d g -e f}{d g -e f}\right ) f h i}{g^{2}}-\frac {b n \ln \left (g x +f \right ) \ln \left (\frac {\left (g x +f \right ) e +d g -e f}{d g -e f}\right ) h^{2}}{g}-\frac {b n \,i^{2} x^{2}}{4 g}+\frac {b n \,i^{2} f x}{g^{2}}+\frac {5 b n \,i^{2} f^{2}}{4 g^{3}}+\frac {b n \,i^{2} d x}{2 e g}+\frac {b n \,i^{2} d f}{2 e \,g^{2}}-\frac {2 b n i h x}{g}-\frac {2 b n i f h}{g^{2}}-\frac {b n \,i^{2} d^{2} \ln \left (\left (g x +f \right ) e +d g -e f \right )}{2 e^{2} g}-\frac {b n \,i^{2} d \ln \left (\left (g x +f \right ) e +d g -e f \right ) f}{e \,g^{2}}+\frac {2 b n i d \ln \left (\left (g x +f \right ) e +d g -e f \right ) h}{e g}+\left (-\frac {i b \pi \,\operatorname {csgn}\left (i c \left (e x +d \right )^{n}\right ) \operatorname {csgn}\left (i c \right ) \operatorname {csgn}\left (i \left (e x +d \right )^{n}\right )}{2}+\frac {i \pi \,\operatorname {csgn}\left (i c \right ) \operatorname {csgn}\left (i c \left (e x +d \right )^{n}\right )^{2} b}{2}+\frac {i \pi \,\operatorname {csgn}\left (i \left (e x +d \right )^{n}\right ) \operatorname {csgn}\left (i c \left (e x +d \right )^{n}\right )^{2} b}{2}-\frac {i \pi \operatorname {csgn}\left (i c \left (e x +d \right )^{n}\right )^{3} b}{2}+b \ln \left (c \right )+a \right ) \left (\frac {i \left (\frac {1}{2} i \,x^{2} g -x f i +2 x g h \right )}{g^{2}}+\frac {\left (f^{2} i^{2}-2 f g h i +g^{2} h^{2}\right ) \ln \left (g x +f \right )}{g^{3}}\right )\) | \(721\) |
[In]
[Out]
\[ \int \frac {(h+i x)^2 \left (a+b \log \left (c (d+e x)^n\right )\right )}{f+g x} \, dx=\int { \frac {{\left (i x + h\right )}^{2} {\left (b \log \left ({\left (e x + d\right )}^{n} c\right ) + a\right )}}{g x + f} \,d x } \]
[In]
[Out]
\[ \int \frac {(h+i x)^2 \left (a+b \log \left (c (d+e x)^n\right )\right )}{f+g x} \, dx=\int \frac {\left (a + b \log {\left (c \left (d + e x\right )^{n} \right )}\right ) \left (h + i x\right )^{2}}{f + g x}\, dx \]
[In]
[Out]
\[ \int \frac {(h+i x)^2 \left (a+b \log \left (c (d+e x)^n\right )\right )}{f+g x} \, dx=\int { \frac {{\left (i x + h\right )}^{2} {\left (b \log \left ({\left (e x + d\right )}^{n} c\right ) + a\right )}}{g x + f} \,d x } \]
[In]
[Out]
\[ \int \frac {(h+i x)^2 \left (a+b \log \left (c (d+e x)^n\right )\right )}{f+g x} \, dx=\int { \frac {{\left (i x + h\right )}^{2} {\left (b \log \left ({\left (e x + d\right )}^{n} c\right ) + a\right )}}{g x + f} \,d x } \]
[In]
[Out]
Timed out. \[ \int \frac {(h+i x)^2 \left (a+b \log \left (c (d+e x)^n\right )\right )}{f+g x} \, dx=\int \frac {{\left (h+i\,x\right )}^2\,\left (a+b\,\ln \left (c\,{\left (d+e\,x\right )}^n\right )\right )}{f+g\,x} \,d x \]
[In]
[Out]